// 后端接口baseUrl iop-price
export const getRestBaseUrl = () => {
  switch (process.env.VUE_APP_ENV) {
    case 'dev':
      return 'http://10.240.16.55:9090/iop-price';
    case 'test':
      return 'https://ecp-te.yifengx.com/iop-price';
    default:
      return 'https://retail.pharmacyyf.com/iop-price';
  }
};

// iop-data
export const getIopDataBaseUrl = () => {
  switch (process.env.VUE_APP_ENV) {
    case 'dev':
      return 'https://ecp-te.yifengx.com/iop-data/';
    case 'test':
      return 'https://ecp-te.yifengx.com/iop-data/';
    default:
      return 'https://retail.pharmacyyf.com/iop-data';
  }
};

// ecp-query
export const getEcpQueryBaseUrl = () => {
  switch (process.env.VUE_APP_ENV) {
    case 'dev':
      return 'http://192.168.7.71:31003/openx/';
    case 'test':
      return 'https://ecp-query-te.yifengx.com/openx/';
    default:
      return 'https://ecp-query.yifengx.com/openx/';
  }
};

// 获取全国省市区编码
export const getChinaRegionUrl = () => 'https://openx.yifengx.com/china.region.json';
